package com.zhangzhibo.service.provider;

import com.zhangzhibo.dao.provider.ProviderMapper;
import com.zhangzhibo.pojo.Provider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProviderServiceImpl implements ProviderService{
    @Autowired
    @Qualifier("providerMapper")
    private ProviderMapper providerMapper;

    @Override
    public int getProviderCounts(String queryProCode, String queryProName,String OperationName,int id) {
        return providerMapper.getProviderCounts(queryProCode,queryProName,OperationName,id);
    }

    @Override
    public List<Provider> getAllBillProvider() {
        return providerMapper.getAllBillProvider();
    }

    @Override
    public List<Provider> getProviderList(String ProCode, String ProName, int currentPageNo, int pageSize) {
        return providerMapper.getProviderList(ProCode,ProName,currentPageNo,pageSize);
    }

    @Override
    public int addProvider(Provider provider) {
        return providerMapper.addProvider(provider);
    }

    @Override
    public int checkProviderNumber(String city) {
        return providerMapper.checkProviderNumber(city);
    }

    @Override
    public int deleteProvider(int providerId) {
        return providerMapper.deleteProvider(providerId);
    }

    @Override
    public Provider findById(int providerId) {
        return providerMapper.findById(providerId);
    }

    @Override
    public int modifyProvider(Provider provider) {
        return providerMapper.modifyProvider(provider);
    }
}
